﻿using System.Runtime.InteropServices;

namespace work1
{
    internal class prime
    {   static bool isPrime(int n)
        {   for (int i = 2; i < n; i++)
            {if (n % i == 0) return false;
                
            }
            return true;
        }
        
        static void Main(string[] args)
        {
            int flag=0;
            String s=Console.ReadLine();
            int c =Convert.ToInt32(s);
            
            { //Console.WriteLine("0");
                for (int i = 2; i <= c; i++)
                {
                    if (isPrime(i) == true) flag++;;
                                  

                }
                Console.WriteLine(flag);
            }

        }
    }
}
